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8, 8, 14, 14, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 13, 14, 14, 13, 8, 8, 7, 10, 
10, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 6, 
6, 7, 8, 8, 8, 9, 9, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 13, 8, 8, 13, 8, 8, 7, 10, 
10, 19, 14, 14, 14, 14, 14, 14, 20, 21, 21, 21, 
21, 21, 21, 21, 20, 14, 14, 14, 14, 14, 19, 6, 
6, 7, 8, 8, 8, 9, 9, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 13, 8, 8, 13, 8, 8, 7, 10, 
10, 7, 8, 8, 8, 9, 9, 8, 8, 8, 7, 10, 
10, 16, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 
0, 1, 2, 2, 2, 12, 12, 2, 2, 2, 1, 0, 
0, 1, 2, 2, 2, 3, 3, 2, 2, 2, 1, 4, 
4, 1, 2, 2, 5, 2, 2, 5, 2, 2, 1, 4, 
4, 1, 2, 2, 2, 15, 15, 2, 2, 2, 1, 0, 
6, 23, 16, 9, 9, 12, 12, 9, 9, 17, 18, 18, 
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 
18, 18, 18, 18, 17, 12, 12, 9, 9, 9, 16, 6, 
6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 
0, 1, 2, 2, 2, 12, 12, 2, 2, 2, 1, 4, 
4, 1, 2, 2, 5, 11, 11, 5, 2, 2, 1, 4, 
4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 
0, 1, 2, 2, 2, 11, 11, 2, 2, 2, 1, 4, 
10, 19, 14, 14, 14, 14, 14, 14, 14, 20, 21, 21, 
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 
21, 21, 21, 21, 20, 14, 14, 14, 14, 14, 19, 6, 
6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 
0, 1, 2, 2, 5, 11, 11, 5, 2, 2, 1, 4, 
4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 
0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 4, 
10, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 10, 
10, 7, 8, 25, 25, 25, 25, 25, 25, 25, 25, 25, 
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 
25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 24, 
27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 30, 31, 31, 30, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 28, 
28, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 29, 
10, 7, 8, 8, 8, 9, 9, 8, 8, 8, 7, 6, 
27, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 27, 
27, 31, 31, 31, 32, 31, 31, 32, 31, 31, 31, 31, 
31, 31, 31, 31, 32, 12, 12, 32, 31, 31, 31, 29, 
29, 28, 28, 28, 30, 12, 12, 30, 28, 28, 28, 27, 
27, 28, 28, 28, 30, 12, 12, 30, 28, 28, 28, 27, 
6, 7, 8, 8, 8, 12, 12, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 13, 14, 14, 13, 8, 8, 7, 6, 
27, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 28, 
28, 28, 28, 28, 30, 33, 33, 30, 28, 28, 28, 27, 
27, 33, 33, 33, 34, 12, 12, 34, 33, 33, 33, 33, 
33, 33, 33, 33, 34, 33, 33, 34, 33, 33, 33, 27, 
27, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 27, 
6, 7, 8, 8, 8, 12, 12, 8, 8, 8, 7, 6, 
27, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 27, 
27, 31, 31, 31, 32, 12, 12, 32, 31, 31, 31, 31, 
31, 31, 31, 31, 32, 31, 31, 32, 31, 31, 31, 27, 
27, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 27, 
6, 7, 8, 8, 13, 12, 12, 13, 8, 8, 7, 6, 
27, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 27, 
27, 33, 33, 33, 34, 33, 33, 34, 33, 33, 33, 33, 
33, 33, 33, 33, 34, 12, 12, 34, 33, 33, 33, 27, 
27, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 30, 28, 28, 30, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 
10, 7, 8, 8, 8, 12, 12, 8, 8, 8, 7, 6, 
27, 28, 28, 28, 30, 12, 12, 30, 28, 28, 28, 27, 
27, 28, 28, 28, 30, 31, 31, 30, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 27, 
6, 7, 8, 8, 8, 9, 9, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 13, 8, 8, 13, 8, 8, 7, 10, 
10, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 10, 
10, 7, 8, 8, 8, 12, 12, 8, 8, 8, 7, 6, 
27, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 27, 
27, 28, 28, 28, 30, 12, 12, 30, 28, 28, 28, 27, 
6, 7, 8, 8, 8, 14, 14, 8, 8, 8, 7, 6, 
27, 28, 28, 28, 30, 31, 31, 30, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 28, 
28, 28, 28, 28, 28, 31, 31, 28, 28, 28, 28, 27, 
6, 7, 8, 8, 8, 14, 14, 8, 8, 8, 7, 6, 
27, 28, 28, 28, 30, 31, 31, 30, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 12, 12, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 27, 
27, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 30, 28, 28, 30, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 33, 33, 28, 28, 28, 28, 29, 
29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27};
